clear all

**************************************************************
* Table IA1. Robustness: Alternative Clustering Approaches
*************************************************************

* Panel A: SE clustered by region

* NLSY
use "nlsy_pseudo", clear
areg fin_distress es_pct college-own_home male i.age, a(reg_yr) cl(region)
boottest es_pct, boottype(wild) reps (16) bootcluster(region) seed(987654321) 

* HRS
use "hrs_pseudo", clear
areg fin_distress es_pct college-own_home male i.age, a(reg_yr) cl(region)
boottest es_pct, boottype(wild) reps (16) bootcluster(region) seed(987654321) 

* HILDA
use "hilda_pseudo", clear
areg late_house es_pct college-own_home male i.age, a(state_wave) cl(state)
boottest es_pct, boottype(wild) reps (256) bootcluster(state) seed(987654321) 
areg late_bill es_pct college-own_home male i.age, a(state_wave) cl(state)
boottest es_pct, boottype(wild) reps (256) bootcluster(state) seed(987654321) 

* Panel B: SE clustered by year

* NLSY
use "nlsy_pseudo", clear
areg fin_distress es_pct college-own_home male i.age, a(reg_yr) cl(year)
boottest es_pct, boottype(wild) reps (64) bootcluster(year) seed(987654321) 

* HRS
use "hrs_pseudo", clear
areg fin_distress es_pct college-own_home male i.age, a(reg_yr) cl(year)
boottest es_pct, boottype(wild) reps (256) bootcluster(year) seed(987654321) 

* HILDA
use "hilda_pseudo", clear
areg late_house es_pct college-own_home male i.age, a(state_wave) cl(wave)
boottest es_pct, boottype(wild) reps (999) bootcluster(wave) seed(987654321) 
areg late_bill es_pct college-own_home male i.age, a(state_wave) cl(wave)
boottest es_pct, boottype(wild) reps (999) bootcluster(wave) seed(987654321) 

* Panel C: SE clustered by reigion x year

* NLSY
use "nlsy_pseudo", clear
reghdfe fin_distress es_pct college-own_home, a(reg_yr male age) cl(reg_yr)

* HRS
use "hrs_pseudo", clear
reghdfe fin_distress es_pct college-own_home, a(reg_yr male age) cl(reg_yr)

* HILDA
use "hilda_pseudo", clear
reghdfe late_house es_pct college-own_home, a(state_wave male age) cl(state_wave)
reghdfe late_bills es_pct college-own_home, a(state_wave male age) cl(state_wave)

